﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Item.aspx.cs" Inherits="WAD.WEB.Client2.Item" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <%="<meta property=\"og:type\" content=\"article\" />" %>
    <%="<meta property=\"og:url\" content=\"http://wjx.711688.com\" />" %>
    <%="<meta property=\"og:pics\" content=\"" + logo + "\"/>"%>
    <%= "<meta property=\"og:release_date\" content=\"" + DateTime.Now.ToString() + "\"/>"%>
    <%= "<meta property=\"og:title\" content=\"" + title + "\"/>" %>
    <%= "<meta property=\"og:description\" content=\"" + GetIntro(50) + "\"/>"%>
    <%= "<meta property=\"og:image\" content=\"" + logo + "\"/>"%>
    <title><%=title%></title>
    <link href="plugins/bootstrap-detail/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="plugins/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="css/base.css?1" rel="stylesheet" type="text/css" />
    <link href="css/detail.css?3" rel="stylesheet" type="text/css" />
    <style>
        .media-right{float: right;margin: 0 10px 0 0;}
        #myjQuery{background: #000;overflow: hidden;}
        #myjQueryContent DIV{height: auto;width: 100%;}
        #myjQueryContent .smask{z-index: -1;}
        #myjQueryContent IMG{width: 100%;height: auto;border: 0;}
        .modal-del{position: absolute;width: 40px;height: 40px;right: 0;top: 0;z-index: 99;}
        .jubao { text-align:right;}
        .jubao a{ float:right; padding:1px 10px 1px 10px;display:block; border:1px solid #ccc; margin-right:10px; color:#999; text-decoration:none; font-size:12px;border-radius:3px;}
    </style>
    <script>
        //显示微信图片
        function showImg(url) {
            var frameid = 'frameimg' + Math.random();
            window.img = '<img id="img" src=\'' + url + '?' + Math.random() + '\' style="max-width:100%"/><script>window.onload = function() { parent.document.getElementById(\'' + frameid + '\').height = document.getElementById(\'img\').height+\'px\'; }<' + '/script>';
            document.write('<iframe id="' + frameid + '" src="javascript:parent.img;" frameBorder="0" scrolling="no" width="100%"></iframe>');
        }
    </script>
</head>
<body class="none-bar">
    <img src="<%= logo %>" width="0" height="0" />
    <%--二维码识别模态框--%>
    <div id="modalQrcode" class="modal fade">
        <div class="modal-del" onclick="$('#modalQrcode').modal('hide');">
            <img class="img-auto" src="img/modal-ewm-del.png" /></div>
        <div class="modal-dialog">
            <div class="modal-content" style="overflow: hidden;">
                <div class="modal-body">
                    <div class="p20 b">
                        <img class="img-auto" id="ewmImg" src="img/ewm.jpg" />
                    </div>
                </div>
                <div class="modal-footer bg-yellow">
                    <div class="text-center f20 white">
                        长按二维码,识别加关注</div>
                </div>
            </div>
        </div>
    </div>
    <div id="detail_con" class="advert-none">
        <!--广告占位-->
        <div class="replace replace-top">
            <img class="mt50 op0" src="img/detail_ad.jpg" />
        </div>
        <!--框架-->
        <div class="ifm-body" style="margin-top: 0px">
        </div>
        <!--start:内容显示部分-->
        <div id="con_body" class="container-fluid mt10 mb50">
            <div>
                <h4>
                    <b id="title">
                        <%=title %></b>
                </h4>
                <div class="row small gray-small">
                    <div class="col-xs-6" id="date">
                        <%=date %>
                    </div>                  
                    <div class="col-xs-4 text-right pull-right">
                        <i class="fa fa-eye"></i>&nbsp;<span id="click"><%= click %></span>
                    </div>
                </div>
                <hr />
                <div class="row">
                    <div class="col-xs-12 f16 content">
                        <%= WAD.WEB.AppCode.HttpTool.FormatImg(content)%>
                    </div>
                </div>
            </div>
            
            <div class="jubao">
                <a onclick="jubao(2)">拉黑</a>
                <a onclick="jubao(1)">举报</a>
            </div>
        </div>
        <!--end:内容显示部分-->
        <div class="row m10 shared-part">
            <div class="col-xs-2" data="weixin">
                <img src="img/share/1.png" /></div>
            <div class="col-xs-2" data="cqq">
                <img src="img/share/2.png" /></div>
            <div class="col-xs-2" data="tsina">
                <img src="img/share/3.png" /></div>
            <div class="col-xs-2" onclick="copyUrl()">
                <img src="img/share/Copy.png" /></div>
            <div class="col-xs-2" data-toggle="modal" data-target="#shared_list" data-whatever="@mdo">
                <img src="img/share/more.png" /></div>
            <div class="col-xs-2" onclick="scrollTo(0,0);">
                <img src="img/share/to_top.png" /></div>
        </div>
        <!--start:分享弹出框-->
        <div class="modal fade" id="shared_list" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="exampleModalLabel">
                            选择分享平台</h4>
                    </div>
                    <div id="share_ico" class="modal-body">
                        <div class="row">
                            <div class="col-xs-4" data="weixin">
                                <img src="img/share/1.png" /><div>
                                    微信</div>
                            </div>
                            <div class="col-xs-4" data="cqq">
                                <img src="img/share/2.png" /><div>
                                    QQ</div>
                            </div>
                            <div class="col-xs-4" data="tsina">
                                <img src="img/share/3.png" /><div>
                                    微博</div>
                            </div>
                        </div>
                        <div class="row mt30">
                            <div class="col-xs-4" data="qzone">
                                <img src="img/share/4.png" /><div>
                                    QQ空间</div>
                            </div>
                            <div class="col-xs-4" data="douban">
                                <img src="img/share/5.png" /><div>
                                    豆瓣</div>
                            </div>
                            <div class="col-xs-4" data="kaixin001">
                                <img src="img/share/6.png" /><div>
                                    开心</div>
                            </div>
                        </div>
                        <div class="row mt30">
                            <div class="col-xs-4" data="renren">
                                <img src="img/share/7.png" /><div>
                                    人人</div>
                            </div>
                            <div class="col-xs-4" data="yixin">
                                <img src="img/share/8.png" /><div>
                                    易信</div>
                            </div>
                            <div class="col-xs-4" data="Canenl" data-dismiss="modal" onclick="collect(); return false;">
                                <img src="img/share/Colltion.png" /><div>
                                    收藏</div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default btn-block" data-dismiss="modal">
                            取消</button>
                    </div>
                </div>
            </div>
        </div>
        <!--end:分享弹出框-->
        <!--start:广告开始-->
        <div class="advert">
            <div class="line-body">
                <span>微街秀</span>
                <div class="line">
                </div>
            </div>
            <div class="ad-img-body advertpert w100b">
                <div class="float">
                    <div id="ad_choose" class="option left">
                        更换广告</div>
                    <div id="ad_close" class="option right">
                        <span class="f18" aria-hidden="true">&times;</span>
                    </div>
                </div>
                <img id="advert_img" src="img/detail_ad1.gif" />
                <!--多个广告切换-->
                <div id="myjQueryContent">
                </div>
            </div>
            <div class="row contact-ico-body h40">
                <%if (mUser != null)
                  {%>
                <div class="col-xs-6">
                    <%if (mUser.qq != null)
                      {%>
                    <img src="img/ad-qq.gif" onclick="toWebQQ('<%=mUser.qq %>');" />
                    <% }%>
                    <%if (mUser.tel != null)
                      {%><a href="tel:<%=mUser.tel %>">
                          <img src="img/ad-tel.gif" /></a>
                    <% }%>
                </div>
                <div class="col-xs-6 text-right">
                    <%if (mUser.wx_code != null)
                      {%><img src="img/ad-wx.gif" data-toggle="modal" data-target="#modalQrcode" onclick="popEwm('Ajax/Qrcode.ashx?Make&size=200&code=' + encodeURI('<%=mUser.wx_code %>'));" /><%} %>
                    <%if (mUser.wx_public_code != null)
                      {%><img src="img/ad-dyh.gif" data-toggle="modal" data-target="#modalQrcode" onclick="popEwm('<%=mUser.wx_public_code %>');" /><%} %>
                </div>
                <% }%>
            </div>
            <!--广告占位-->
            <div class="replace replace-bottom">
                <img class="op0" src="img/detail_ad.jpg" />
            </div>
        </div>
        <!--end:广告开始-->
        <!--广告占位-->
        <div class="replace replace-bottom">
            <img class="mt50 op0" src="img/detail_ad.jpg" />
        </div>
    </div>
    <input type="hidden" id="logo" value="<%=logo %>" />
    <input type="hidden" id="url" value="<%=url %>" />
    <input type="hidden" id="type" value="<%=type %>" />
    <input type="hidden" id="phone" value="<%=phone %>" />
    <!--Javascript-->
    <script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="js/dialog.js" type="text/javascript"></script>
    <script src="js/Share.js" type="text/javascript"></script>
    <script src="js/base.js" type="text/javascript"></script>
    <script src="js/ajax-data.js" type="text/javascript"></script>
    <script src="js/item.js?t=<%=DateTime.Now.Millisecond%>" type="text/javascript"></script>
    <script type="text/javascript">
        var arrAD=new Array();  //图片轮播数组
        <%= sbAdvert.ToString() %>
        jQuery(function ($) {
            //处理.net域名广告被朋友圈广告屏蔽问题
            if(navigator.userAgent.indexOf("MicroMessenger") != -1){
                var url=document.location.href;
                if(url.indexOf('http://wjx.711688.net')==0){
                    document.location.href=url.replace('http://wjx.711688.net','http://wjx.711688.cn');
                    return;
                }
            }
            if(!logimg())return;
            var index = 0;
            var maximg = arrAD.length;
            if(maximg<1) return;
            //自动播放
            var MyTime = setInterval(function () {
                ShowFlash(index);
                index++;
                if (index == maximg) { index = 0; }
            }, 2000);
        });

        function ShowFlash(i) {
            $("#myjQueryContent div").eq(i).css({ "display": "block" }) .siblings().css({ "display": "none" });
        }
        function logimg()
        {
         if(arrAD.length < 2) return false;
        
        $("#advert_img").css("display","none");   
         $("#myjQueryContent").html("");
           for (var i = 0; i < arrAD.length; i++) {
            if(i==0)
                $("#myjQueryContent").append("<div ><a href='javascript:toAd("+arrAD[i].toString().split(',')[0]+")'><img src='"+arrAD[i].toString().split(',')[1]+"' title=''></a></div>");
            else
                $("#myjQueryContent").append("<div style='display:none'><a  href='javascript:toAd("+arrAD[i].toString().split(',')[0]+")'><img src='"+arrAD[i].toString().split(',')[1]+"' title=''></a></div>");
           }
           return true;
        }
       
        //调到qq聊天
        function toWebQQ(qq){
            var userAgent = navigator.userAgent.toLocaleLowerCase();
            if(userAgent.indexOf("micromessenger") > 0)
            {
                alert("请选择用其他浏览器打开");
                return;
            }
            window.location.href = "mqqwpa://im/chat?chat_type=wpa&uin=" + qq + "&version=1&src_type=web&web_src=wjx.711688.com";
        }

        //弹出二维码
        function popEwm(src){
            $("#ewmImg").attr("src",src);
            $('#modalQrcode').show();
        }

        //举报,拉黑
        function jubao(tab){           
            var url=document.location.href;
            window.location.href='jubao.html?type='+tab +"&title="+ encodeURIComponent(title)+"&url="+encodeURIComponent(url);
        }
    </script>
</body>
</html>
